<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>易买网 - 首页</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="scripts/function.js"></script>
</head>
<body>
<%
String commodityID = request.getParameter("commodityID");
String commodityName = request.getParameter("commodityName");
String commodityNameString = new String(commodityName.getBytes("ISO-8859-1"),"UTF-8");
String inventory = request.getParameter("inventory");
String commodityPrice=request.getParameter("commodityPrice");
String pictureSource = request.getParameter("pictureSource");
String commodityIntroduce = request.getParameter("commodityIntroduce");
String commodityIntroduceString = new String(commodityIntroduce.getBytes("ISO-8859-1"),"UTF-8");

%>


<script type="text/javascript" charset="utf-8">
	var a =<%=commodityID %> 
	
	$(document).ready(function(){
		$("#load").click(function(){
			$.ajax({
				url:"ShowEvaluationInfoServlet",	//要发送的后台地址
				type:"post",				//数据发送的方式
				data:{commodityID:a},		//要发送的数据
				dataType:"json",		//后台处理返回的格式
				success:function(data){
					var json=eval(data);
					var con;
					$.each(json,function(index,item){
						var s1 = json[index].commentContent;
						var s2 = json[index].commentTime;
						con+="<p>"+s1+"</p>"+"<p>"+s2+"</p>";
					})
					$("#loading").html(con);
					
					
				}
			})
		})
	})






</script>
<div id="header" class="wrap">
	<div id="logo"><img src="images/logo.gif" /></div>
	<div class="help"><a href="/easyBuy170601/ShoppingCarInfoServlet" id="shoppingBag" class="shopping">购物车X件</a><a href="login.jsp">登录</a><a class="button" id="logout" href="javascript:void(0);">注销</a><a href="register.html">注册</a><a href="/easyBuy170601/ShowLeavingInfoServlet">留言</a><a href="manage/index.jsp">后台管理</a></div>
	<div class="navbar">
		<ul class="clearfix">
			<li class="current"><a href="#">首页</a></li>
			<li><a href="#">图书</a></li>
			<li><a href="#">百货</a></li>
			<li><a href="#">品牌</a></li>
			<li><a href="#">促销</a></li>
		</ul>
	</div>
</div>
<div id="childNav">
	<div class="wrap">
		<ul class="clearfix">
			<li class="first"><a href="#">音乐</a></li>
			<li><a href="#">影视</a></li>
			<li><a href="#">少儿</a></li>
			<li><a href="#">动漫</a></li>
			<li class="last"><a href="#">Investor Relations</a></li>
		</ul>
	</div>
</div>
<div id="position" class="wrap">
	您现在的位置：<a href="index.html">易买网</a> &gt; <a href="product-list.html">图书音像</a> &gt; 图书
</div>
<div id="main" class="wrap">
	<div class="lefter">
		<div class="box">
			<h2>商品分类</h2>
			<dl>
				<dt>图书音像</dt>
				<dd><a href="product-list.html">图书</a></dd>
				<dd><a href="product-list.html">音乐</a></dd>
				<dt>百货</dt>
				<dd><a href="product-list.html">运动健康</a></dd>
				<dd><a href="product-list.html">服装</a></dd>
				<dd><a href="product-list.html">家居</a></dd>
				<dd><a href="product-list.html">美妆</a></dd>

			</dl>
		</div>
	</div>
	<div id="product" class="main">
		<h1><%=commodityNameString %></h1>
		<div class="infos">
			<div class="thumb"><img src="<%=pictureSource %>" width="110" height="106" /></div>
			<div class="buy">
				商城价：<span class="price">￥<%=commodityPrice %></span><br />
				库　存：<%=inventory %>
			  <div class="button"><input type="button" name="button" value="" onclick="location.href = 'address.jsp?commodityName=<%=commodityNameString %>&commodityPrice=<%=commodityPrice %>&pictureSource=<%=pictureSource %>&commodityID=<%=commodityID %>'" />
			  <a href="/easyBuy170601/ShoppingCarInfoServlet?commodityID=<%=commodityID %>">放入购物车</a></div>
			</div>
			<div class="clear"></div>
		</div>
		<div class="introduce">
			<h2><strong>商品详情</strong></h2>
			<div class="text">
				<br />
				<br />
			</div>
		</div>
		<div>
			<input id="load" type="button" value="点击加载评论信息" >
		</div>
		<div >
			<ul id=loading></ul>
		
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">

	Copyright &copy; 2017云和学院 All Rights Reserved. 京ICP证1000001号</div>
</body>
</html>
